<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:useBean id="user" class="com.example.demoweb.User" scope="request"/>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>JSP - Hello World</title>
    <meta charset="UTF-8">
</head>
<body>
<h1><%= "Hello World!" %>
</h1>
<br/>
<a href="hello-servlet">Hello Servlet</a>
<c:if test="${ user != null }">
    <p>c:if为真时</p>
</c:if>
<jsp:setProperty name="user" property="username" value="张三"/>
${ user.username }
</body>
</html>